package com.yykj.common.exception;

import com.yykj.common.enums.ResultEnums;
import lombok.Getter;

/**
 * 系统运行时，自己抛出的普通的异常 Created by chendg on 2018/1/8 0008.
 */
@Getter
public class NormalException extends RuntimeException {

	private Integer code;

	private String msg;

	public NormalException(ResultEnums resultEnums) {
		this.code = resultEnums.getCode();
		this.msg = resultEnums.getMessage();
	}

	public NormalException(ResultEnums resultEnums, String message) {
		this.code = resultEnums.getCode();
		this.msg = message;
	}

}
